package com.itheima.autoconfig;

import com.itheima.autoconfig.properties.SmsProperties;
import com.itheima.autoconfig.template.SmsTemplate;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @author CSY
 * 2022/5/19    18:45
 */
@EnableConfigurationProperties({SmsProperties.class})
public class ThAutoConfiguration {

    @Bean
    public SmsTemplate smsTemplate(SmsProperties smsProperties){

        return new SmsTemplate(smsProperties);
    }
}
